/*
 * @(#)UserContent.java $version 2012. 5. 24.
 *
 */

package com.mywep.myalimi.model;

import java.util.Calendar;
import java.util.Date;

import org.apache.commons.lang.time.DateUtils;

/**
 * @author 한지웅
 */
public class UserContent {
	private int userContentKey;
	private String id;
	private String keyword;
	private String tag;
	private String url;
	private String title;
	private String contextType;
	private Date regDate;
	private String summary;
	private Date insertDate;
	private String auth;
	private String category;

	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}

	public boolean isNewContent() {
		Date now = Calendar.getInstance().getTime();
		if (this.insertDate.after(DateUtils.addHours(now, -12))) {
			return true;
		}
		return false;
	}

	public int getUserContentKey() {
		return userContentKey;
	}

	public void setUserContentKey(int userContentKey) {
		this.userContentKey = userContentKey;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public String getTag() {
		return tag;
	}

	public void setTag(String tag) {
		this.tag = tag;
	}

	public String getContextType() {
		return contextType;
	}

	public void setContextType(String contextType) {
		this.contextType = contextType;
	}

	public Date getRegDate() {
		return regDate;
	}

	public void setRegDate(Date regDate) {
		this.regDate = regDate;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public Date getInsertDate() {
		return insertDate;
	}

	public void setInsertDate(Date insertDate) {
		this.insertDate = insertDate;
	}
	public String getAuth() {
		return auth;
	}
	public void setAuth(String auth) {
		this.auth = auth;
	}
	public String getCategory() {
		return category;
	}
	public void setCategory(String category) {
		this.category = category;
	}

}
